package week3;
// 售票口模拟。
public class Customer {
    private int arrivalTime, departureTime;

    // 构造函数
    public Customer (int arrives)
    {
        arrivalTime = arrives;
        departureTime = 0;
    }

    // 返回arrivalTime
    public int getArrivalTime()
    {
        return arrivalTime;
    }

    // 更改departureTime
    public void setDepartureTime (int departs)
    {
        departureTime = departs;
    }

    // 返回departureTime
    public int getDepartureTime()
    {
        return departureTime;
    }

    // 计算并且返回总体时间
    public int totalTime()
    {
        return departureTime - arrivalTime;
    }
}
